package szoftlab4sunak;

import java.awt.Color;
import java.awt.Graphics;

public class VElf implements VEnemy {
	
	private Color color;	//Hozza tartozo szin 
	private Elf elf;		//ELf tipusu ellenseg tarolasa
	
	//Konstruktor
	public VElf(){
		//Szin beallitasa
		this.color = Color.pink;
	}
	
	@Override
	public void draw(Graphics g) {
		
		g.setColor(this.color);
		//Poziciok lekerdezese a tarolt objektumtol
        int x1 = elf.getPosx()+50;
        int y1 = elf.getPosy()+50;
        int r1 = 50;
        
        //Kor kirajzolasa
        x1 = x1 - (r1/2);
        y1 = y1 - (r1/2);
        g.fillOval(x1,y1,r1,r1);
		
	}

	@Override
	public boolean positionChanged() {
		
		return false;
	}

	//A hozza tartozo objektum beallitasa
	public void setEnemy(Elf e) {
		this.elf = e;		
	}

	// megnezi hogy a 0. cellan allnak-e
		@Override
		public boolean isDrawable() {
			if(elf.currentCell.getID() == 0)
				return false;
			else return true;
		}

}
